import 'package:fish_redux/fish_redux.dart';
import 'package:hayll_app_village_master/hayll/village_manager/home/main_page/bean/company.dart';

//TODO replace with your own action
enum MainAction {
  refresh, 
  updateCompanyList,
  switchCompany,
  switchVillage,
   }

class MainActionCreator {
  static Action updateCompanyList(List<CompanyResult> list) {
    return Action(MainAction.updateCompanyList,payload: list);
  }

  static Action switchCompany(int companyId) {
    return Action(MainAction.switchCompany,payload: companyId);
  }

    static Action switchVillage(int villageId) {
    return Action(MainAction.switchVillage,payload: villageId);
  }

  static Action refreshUI() {
    return Action(MainAction.refresh);
  }
}
